<template>
  <div class="category">
    <h3>{{ title }}分类</h3>
    <!-- 定义一个插槽，等待组件的使用者进行填充-->
    <!-- :games="games" 作用域插槽 -->
    <slot :games="games">插槽默认值</slot>
  </div>
</template>

<script>
export default {
  name: "Category",
  props: ['title'],
  data() {
    return {
      games: ['红色', 'cs', '超级码丽', '魔兽'],
    }
  },
}
</script>

<style scoped>
.category {
  background-color: skyblue;
  width: 200px;
  height: 300px;
}

h3 {
  background-color: orange;
  text-align: center;
}

video {
  width: 100%;
}

img {
  width: 100%;
}
</style>